//数据部分
import 'package:dk_flutter_module_sale/phoenix/tools/bean/bean_tools_category.dart';

class DataBean {
  UserInfoBean userInfo;
  List<ModulesListBean> list;

  DataBean({this.userInfo, this.list});

  DataBean.fromJson(Map<String, dynamic> json) {    
    this.userInfo = json['userInfo'] != null ? UserInfoBean.fromJson(json['userInfo']) : null;
    this.list = (json['list'] as List)!=null?(json['list'] as List).map((i) => ModulesListBean.fromJson(i)).toList():null;
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = new Map<String, dynamic>();
    if (this.userInfo != null) {
      data['userInfo'] = this.userInfo.toJson();
    }
    data['list'] = this.list != null?this.list.map((i) => i.toJson()).toList():null;
    return data;
  }
}

//个人信息
class UserInfoBean {
  String headerImageUrl;
  String name;
  String position;
  String department;
  int joinDays;
  int yearVacation;

  UserInfoBean({this.headerImageUrl = "", this.name = "", this.position = "", this.department = "", this.joinDays = 0, this.yearVacation});

  UserInfoBean.fromJson(Map<String, dynamic> json) {    
    this.headerImageUrl = json['headerImageUrl'] ?? "";
    this.name = json['name'] ?? "";
    this.position = json['position'] ?? "";
    this.department = json['department'] ?? "";
    this.joinDays = json['joinDays'] ?? 0;
    this.yearVacation = json['yearVacation'];
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = new Map<String, dynamic>();
    data['headerImageUrl'] = this.headerImageUrl;
    data['name'] = this.name;
    data['position'] = this.position;
    data['department'] = this.department;
    data['joinDays'] = this.joinDays;
    data['yealVacation'] = this.yearVacation;
    return data;
  }
}


